<style lang="less">
    @import "detail.less";
</style>
<template>


    <div>
        <Card style="width:100%" shadow>
            <!--基本信息-->
            <Row>
                <Alert>
                    <h2>基本信息</h2>
                </Alert>
                <Form ref="baseInfo" :model="caseInfo" class="detailForm"
                      :label-width="100"
                      inline>
                    <Row>
                        <Col span="6">
                            <FormItem prop="startTime" label="申请时间">
                                <DatePicker type="date" v-model="caseInfo.startTime" disabled placeholder="选择日期"></DatePicker>
                            </FormItem>
                        </Col>
                        <Col span="6">
                            <FormItem prop="endTime" label="结束时间" >
                                <DatePicker type="date" v-model="caseInfo.endTime" disabled placeholder="选择日期"></DatePicker>
                            </FormItem>
                        </Col>
                        <Col span="6">
                            <FormItem prop="createBy" label="创建人">
                                <Input type="text" v-model="caseInfo.createBy" disabled placeholder="请输入">
                                </Input>
                            </FormItem>
                        </Col>
                    </Row>
                </Form>
            </Row>
            <!--合同信息-->
            <Row>
                <Form ref="contractInfo" :model="contractInfo" class="detailForm"
                      :label-width="100"
                      inline>
                    <Alert>
                        <h2>合同信息</h2>
                    </Alert>
                    <Row>
                        <Col span="6">
                            <FormItem prop="applyNo" label="申请编号" >
                                <Input type="text" v-model="contractInfo.applyNo" disabled placeholder="请输入">
                                </Input>
                            </FormItem>
                        </Col>
                        <Col span="6">
                            <FormItem prop="custName" label="客户姓名" >
                                <Input type="text" v-model="contractInfo.custName" disabled placeholder="请输入">
                                </Input>
                            </FormItem>
                        </Col>
                        <Col span="6">
                            <FormItem prop="certNo" label="证件号码" >
                                <Input type="text" v-model="contractInfo.certNo" disabled placeholder="请输入">
                                </Input>
                            </FormItem>
                        </Col>
                        <Col span="6">
                            <FormItem prop="phone" label="联系方式" >
                                <Input type="text" v-model="contractInfo.phone" disabled placeholder="请输入">
                                </Input>
                            </FormItem>
                        </Col>
                    </Row>
                    <Row>
                        <Col span="6">
                            <FormItem prop="startDate" label="合同激活时间" >
                                <DatePicker type="date" v-model="contractInfo.startDate" disabled placeholder="选择日期"></DatePicker>
                            </FormItem>
                        </Col>
                        <Col span="6">
                            <FormItem prop="endDate" label="合同终止时间" >
                                <DatePicker type="date" v-model="contractInfo.endDate" disabled placeholder="选择日期"></DatePicker>
                            </FormItem>
                        </Col>
                    </Row>
                </Form>
            </Row>
            <!--业务办理-->
            <Row>
                <Alert>
                    <h2>业务办理</h2>
                </Alert>
                <Form ref="caseInfo" :model="caseInfo" class="detailForm"
                      :label-width="100"
                      inline>
                    <Row>
                        <Col span="6">
                            <FormItem prop="receivingBank" label="收款银行">
                                <Select v-model="caseInfo.receivingBank" disabled placeholder="请选择">
                                    <Option v-for="item in dataDic.bankCode" :label="item.title" :value="item.value" :key="item.value">{{ item.title }}</Option>
                                </Select>
                            </FormItem>
                        </Col>
                        <Col span="6">
                            <FormItem prop="payAmt" label="打款金额" >
                                <Input type="text" v-model="caseInfo.payAmt" disabled placeholder="请输入">
                                </Input>
                            </FormItem>
                        </Col>
                        <Col span="6">
                            <FormItem prop="payTime" label="打款时间">
                                <DatePicker type="date" v-model="caseInfo.payTime" disabled placeholder="选择日期"></DatePicker>
                            </FormItem>
                        </Col>
                        <Col span="6">
                            <FormItem prop="payer" label="打款人" >
                                <Input type="text" v-model="caseInfo.payer" disabled placeholder="请输入">
                                </Input>
                            </FormItem>
                        </Col>
                    </Row>
                    <Row>
                        <Col span="24">
                            <FormItem prop="remarks" label="说明">
                                <Input type="text" class="holeLine" v-model="caseInfo.remarks" disabled placeholder="请输入">
                                </Input>
                            </FormItem>
                        </Col>
                    </Row>
                    <Row>
                        <Col span="24">
                            <FormItem prop="images" label="打款凭证">
                                <div class="imageArea"></div>
                            </FormItem>
                        </Col>
                    </Row>
                </Form>
            </Row>
        </Card>
    </div>

</template>

<script>
    import {
        getByTypes
    } from "_p/basic/api/admin/datadic";
    import {
        queryCorporateByCaseNo,
        contractInfoForCorporate
    } from "@/projects/afs-apply/api/contract/corporate/corporateTransferManagement";

    export default {
        name: "detailForChannelView",
        components: {
        },
        props: {
            obj: {
                caseNo: "",
                contractNo: "",
                id:"",
                type:Object
            }
        },
        data: function () {
            return {
                dicKeys: [
                    "bankCode","businessSource","contractStatus","channelType"
                ],
                dataDic:{},
                caseInfo:{},
                contractInfo:{},
            }
        },
        methods: {
            initDataDic(){
                let self = this;
                getByTypes(this.dicKeys).then(res => {
                    if (res.code === "0000" && res.data) {
                        self.dataDic = res.data;
                    }
                });
            },
            queryCaseInfo(){

                queryCorporateByCaseNo(this.obj.caseNo).then(res => {
                    if (res.code === "0000") {
                        this.caseInfo = res.data;
                    }
                });
            },
            queryContractInfo(){
                contractInfoForCorporate(this.obj.contractNo).then(res => {
                    if (res.code === "0000") {
                        this.contractInfo = res.data;
                    }
                });
            },
            init(){
                //加载数字字典
                this.initDataDic();
                //加载合同信息
                this.queryContractInfo();
                //加载对公结算案件详情
                this.queryCaseInfo();
            },
        }
    }
</script>

<style scoped>

</style>
